﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Game.aspx.cs" Inherits="WebApplication2.Game1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="upPlayers" runat="server" UpdateMode="Conditional">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="timerUpdatePlayerDetails" EventName="Tick" />
        </Triggers>
        <ContentTemplate>
            <asp:Timer ID="timerUpdatePlayerDetails" runat="server" OnTick="timerUpdatePlayerDetails_Tick"
                Enabled="true" Interval="1000">
            </asp:Timer>
            <asp:DetailsView ID="detailsViewCurrentGame" runat="server" Height="50px" Width="125px"
                AutoGenerateRows="false">
                <Fields>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            Player One</HeaderTemplate>
                        <ItemTemplate>
                            <asp:Label Text='<%# GetUserName("User1ID") %>' runat="server" /></ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            Player Two</HeaderTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label2" Text='<%# GetUserName("User2ID") %>' runat="server" /></ItemTemplate>
                    </asp:TemplateField>
                </Fields>
            </asp:DetailsView>
            <br />
            <asp:UpdatePanel ID="upGameTable" runat="server" UpdateMode="Conditional">
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="timerGame" EventName="Tick" />
                </Triggers>
                <ContentTemplate>
                    <asp:Timer ID="timerGame" runat="server" Enabled="false" Interval="1000" OnTick="timerGame_Tick">
                    </asp:Timer>
                    <asp:Panel ID="gameTable" runat="server" Visible="false">
                        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><br />
                    </asp:Panel>
                </ContentTemplate>
            </asp:UpdatePanel>
        </ContentTemplate>
    </asp:UpdatePanel>
    <br />
</asp:Content>
